﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommonObjects.LeasingLogic;


namespace CommonObjects.LeasingLogic
{

    public class HelperClasses
    {
        public HelperClasses()
        {

        }

 
        public Gyak getGyakEnumByName(String name)
        {
            switch (name) {
                case "Havi": { return Gyak.Havi; }
                case "Negyedev" : { return Gyak.Negyedev; }
                case "Feleves" : { return Gyak.Feleves; }
                case "Eves" : { return Gyak.Eves; }

                default: { return Gyak.Havi;  }
            }

        }
                

        
        public String[] getEnumDataSource(Type enumType)
        {
            Array arrayValue;

            arrayValue = System.Enum.GetValues(enumType);
            String[] retVal = new String[arrayValue.Length];
            int i = 0;
            while (i < arrayValue.Length)
            {
                retVal[i] = arrayValue.GetValue(i).ToString();
                i++;
            }

            return retVal;
        }
    }
}
